package com.hivekion.quartz.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.gitee.sunchenbin.mybatis.actable.annotation.ColumnComment;
import com.gitee.sunchenbin.mybatis.actable.annotation.ColumnType;
import com.gitee.sunchenbin.mybatis.actable.constants.MySqlTypeConstant;
import com.hivekion.common.entity.BaseEntity;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * @authot morning
 * @date 2021/8/4 9:31
 */
@Data
@TableName("x_job")
public class JobEntity extends BaseEntity implements Serializable {
      @TableField
      @ColumnType(value = MySqlTypeConstant.VARCHAR, length = 250)
      @ColumnComment("执行类")
      private String className; // 定时任务实例的 class路径

      @TableField
      @ColumnType(value = MySqlTypeConstant.VARCHAR, length = 50)
      @ColumnComment("cron表达式")
      private String cronExpression;

      @TableField
      @ColumnType(value = MySqlTypeConstant.VARCHAR, length = 50)
      @ColumnComment("定时任务名称")
      private String jobName;

      @TableField
      @ColumnType(value = MySqlTypeConstant.VARCHAR, length = 50)
      @ColumnComment("所属组")
      private String jobGroup;

      @TableField
      @ColumnType(value = MySqlTypeConstant.VARCHAR, length = 50)
      @ColumnComment("触发器名称")
      private String triggerName;

      @TableField
      @ColumnType(value = MySqlTypeConstant.VARCHAR, length = 50)
      @ColumnComment("触发器组")
      private String triggerGroup;

      @TableField
      @ColumnType(value = MySqlTypeConstant.TEXT)
      @ColumnComment("携带参数")
      private String data;

      @TableField
      @ColumnType(value = MySqlTypeConstant.INT)
      @ColumnComment("是否暂停:0暂停,1执行")
      private int pauseStatus;

      @TableField
      @ColumnType(value = MySqlTypeConstant.DATETIME)
      @ColumnComment("发送时间")
      private Date sendTime;

      @TableField
      @ColumnType(value = MySqlTypeConstant.INT)
      @ColumnComment("执行周期类型(0天 1周 2月 3季度 4年)")
      private int dateType;
      //    @TableField
      //    @ColumnType(value = MySqlTypeConstant.BIT)
      //    @ColumnComment("是否有效")
      //    private Boolean deleteStatus;
      @TableField
      @ColumnType(value = MySqlTypeConstant.INT)
      @ColumnComment("定时任务发送方式:0:指定人发送,1:所有人")
      private int isAll;
}
